3.74 \(\int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))}{(a+a \sin (e+f x))^3} \, dx\)

Optimal. Leaf size=103 \[ \frac {c (A+4 B) \cos (e+f x)}{15 f \left (a^3 \sin (e+f x)+a^3\right )}+\frac {a c (A-11 B) \cos (e+f x)}{15 f \left (a^2 \sin (e+f x)+a^2\right )^2}-\frac {2 c (A-B) \cos (e+f x)}{5 f (a \sin (e+f x)+a)^3} \]

[Out]

-2/5*(A-B)*c*cos(f*x+e)/f/(a+a*sin(f*x+e))^3+1/15*a*(A-11*B)*c*cos(f*x+e)/f/(a^2+a^2*sin(f*x+e))^2+1/15*(A+4*B
)*c*cos(f*x+e)/f/(a^3+a^3*sin(f*x+e))

________________________________________________________________________________________

Rubi [A]  time = 0.23, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2967, 2857, 2750, 2648} \[ \frac {c (A+4 B) \cos (e+f x)}{15 f \left (a^3 \sin (e+f x)+a^3\right )}+\frac {a c (A-11 B) \cos (e+f x)}{15 f \left (a^2 \sin (e+f x)+a^2\right )^2}-\frac {2 c (A-B) \cos (e+f x)}{5 f (a \sin (e+f x)+a)^3} \]

Antiderivative was successfully verified.

[In]

Int[((A + B*Sin[e + f*x])*(c - c*Sin[e + f*x]))/(a + a*Sin[e + f*x])^3,x]

[Out]

(-2*(A - B)*c*Cos[e + f*x])/(5*f*(a + a*Sin[e + f*x])^3) + (a*(A - 11*B)*c*Cos[e + f*x])/(15*f*(a^2 + a^2*Sin[
e + f*x])^2) + ((A + 4*B)*c*Cos[e + f*x])/(15*f*(a^3 + a^3*Sin[e + f*x]))

Rule 2648

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> -Simp[Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 2750

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((b
*c - a*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m)/(a*f*(2*m + 1)), x] + Dist[(a*d*m + b*c*(m + 1))/(a*b*(2*m + 1)
), Int[(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 -
b^2, 0] && LtQ[m, -2^(-1)]

Rule 2857

Int[cos[(e_.) + (f_.)*(x_)]^2*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_
)]), x_Symbol] :> Simp[(2*(b*c - a*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b^2*f*(2*m + 3)), x] + Dist[
1/(b^3*(2*m + 3)), Int[(a + b*Sin[e + f*x])^(m + 2)*(b*c + 2*a*d*(m + 1) - b*d*(2*m + 3)*Sin[e + f*x]), x], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[a^2 - b^2, 0] && LtQ[m, -3/2]

Rule 2967

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a^m*c^m, Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B
*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && I
ntegerQ[m] &&  !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))

Rubi steps

\begin {align*} \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))}{(a+a \sin (e+f x))^3} \, dx &=(a c) \int \frac {\cos ^2(e+f x) (A+B \sin (e+f x))}{(a+a \sin (e+f x))^4} \, dx\\ &=-\frac {2 (A-B) c \cos (e+f x)}{5 f (a+a \sin (e+f x))^3}-\frac {c \int \frac {a A-6 a B+5 a B \sin (e+f x)}{(a+a \sin (e+f x))^2} \, dx}{5 a^2}\\ &=-\frac {2 (A-B) c \cos (e+f x)}{5 f (a+a \sin (e+f x))^3}+\frac {(A-11 B) c \cos (e+f x)}{15 a f (a+a \sin (e+f x))^2}-\frac {((A+4 B) c) \int \frac {1}{a+a \sin (e+f x)} \, dx}{15 a^2}\\ &=-\frac {2 (A-B) c \cos (e+f x)}{5 f (a+a \sin (e+f x))^3}+\frac {(A-11 B) c \cos (e+f x)}{15 a f (a+a \sin (e+f x))^2}+\frac {(A+4 B) c \cos (e+f x)}{15 f \left (a^3+a^3 \sin (e+f x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.82, size = 139, normalized size = 1.35 \[ \frac {c \left (-15 (A+B) \cos \left (e+\frac {f x}{2}\right )+5 (A+B) \cos \left (e+\frac {3 f x}{2}\right )+A \sin \left (2 e+\frac {5 f x}{2}\right )+5 A \sin \left (\frac {f x}{2}\right )-15 B \sin \left (2 e+\frac {3 f x}{2}\right )+4 B \sin \left (2 e+\frac {5 f x}{2}\right )-25 B \sin \left (\frac {f x}{2}\right )\right )}{30 a^3 f \left (\sin \left (\frac {e}{2}\right )+\cos \left (\frac {e}{2}\right )\right ) \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )^5} \]

Antiderivative was successfully verified.

[In]

Integrate[((A + B*Sin[e + f*x])*(c - c*Sin[e + f*x]))/(a + a*Sin[e + f*x])^3,x]

[Out]

(c*(-15*(A + B)*Cos[e + (f*x)/2] + 5*(A + B)*Cos[e + (3*f*x)/2] + 5*A*Sin[(f*x)/2] - 25*B*Sin[(f*x)/2] - 15*B*
Sin[2*e + (3*f*x)/2] + A*Sin[2*e + (5*f*x)/2] + 4*B*Sin[2*e + (5*f*x)/2]))/(30*a^3*f*(Cos[e/2] + Sin[e/2])*(Co
s[(e + f*x)/2] + Sin[(e + f*x)/2])^5)

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 191, normalized size = 1.85 \[ \frac {{\left (A + 4 \, B\right )} c \cos \left (f x + e\right )^{3} - {\left (2 \, A - 7 \, B\right )} c \cos \left (f x + e\right )^{2} + 3 \, {\left (A - B\right )} c \cos \left (f x + e\right ) + 6 \, {\left (A - B\right )} c - {\left ({\left (A + 4 \, B\right )} c \cos \left (f x + e\right )^{2} + 3 \, {\left (A - B\right )} c \cos \left (f x + e\right ) + 6 \, {\left (A - B\right )} c\right )} \sin \left (f x + e\right )}{15 \, {\left (a^{3} f \cos \left (f x + e\right )^{3} + 3 \, a^{3} f \cos \left (f x + e\right )^{2} - 2 \, a^{3} f \cos \left (f x + e\right ) - 4 \, a^{3} f + {\left (a^{3} f \cos \left (f x + e\right )^{2} - 2 \, a^{3} f \cos \left (f x + e\right ) - 4 \, a^{3} f\right )} \sin \left (f x + e\right )\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))/(a+a*sin(f*x+e))^3,x, algorithm="fricas")

[Out]

1/15*((A + 4*B)*c*cos(f*x + e)^3 - (2*A - 7*B)*c*cos(f*x + e)^2 + 3*(A - B)*c*cos(f*x + e) + 6*(A - B)*c - ((A
 + 4*B)*c*cos(f*x + e)^2 + 3*(A - B)*c*cos(f*x + e) + 6*(A - B)*c)*sin(f*x + e))/(a^3*f*cos(f*x + e)^3 + 3*a^3
*f*cos(f*x + e)^2 - 2*a^3*f*cos(f*x + e) - 4*a^3*f + (a^3*f*cos(f*x + e)^2 - 2*a^3*f*cos(f*x + e) - 4*a^3*f)*s
in(f*x + e))

________________________________________________________________________________________

giac [A]  time = 0.17, size = 138, normalized size = 1.34 \[ -\frac {2 \, {\left (15 \, A c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 15 \, A c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 15 \, B c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 25 \, A c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 5 \, B c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 5 \, A c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 5 \, B c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 4 \, A c + B c\right )}}{15 \, a^{3} f {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))/(a+a*sin(f*x+e))^3,x, algorithm="giac")

[Out]

-2/15*(15*A*c*tan(1/2*f*x + 1/2*e)^4 + 15*A*c*tan(1/2*f*x + 1/2*e)^3 + 15*B*c*tan(1/2*f*x + 1/2*e)^3 + 25*A*c*
tan(1/2*f*x + 1/2*e)^2 - 5*B*c*tan(1/2*f*x + 1/2*e)^2 + 5*A*c*tan(1/2*f*x + 1/2*e) + 5*B*c*tan(1/2*f*x + 1/2*e
) + 4*A*c + B*c)/(a^3*f*(tan(1/2*f*x + 1/2*e) + 1)^5)

________________________________________________________________________________________

maple [A]  time = 0.45, size = 115, normalized size = 1.12 \[ \frac {2 c \left (-\frac {-16 A +16 B}{4 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{4}}-\frac {8 A -8 B}{5 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{5}}-\frac {14 A -10 B}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}-\frac {-6 A +2 B}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {A}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}\right )}{f \,a^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*sin(f*x+e))*(c-c*sin(f*x+e))/(a+a*sin(f*x+e))^3,x)

[Out]

2/f*c/a^3*(-1/4*(-16*A+16*B)/(tan(1/2*f*x+1/2*e)+1)^4-1/5*(8*A-8*B)/(tan(1/2*f*x+1/2*e)+1)^5-1/3*(14*A-10*B)/(
tan(1/2*f*x+1/2*e)+1)^3-1/2*(-6*A+2*B)/(tan(1/2*f*x+1/2*e)+1)^2-A/(tan(1/2*f*x+1/2*e)+1))

________________________________________________________________________________________

maxima [B]  time = 0.35, size = 733, normalized size = 7.12 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))/(a+a*sin(f*x+e))^3,x, algorithm="maxima")

[Out]

-2/15*(A*c*(20*sin(f*x + e)/(cos(f*x + e) + 1) + 40*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 30*sin(f*x + e)^3/(c
os(f*x + e) + 1)^3 + 15*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 7)/(a^3 + 5*a^3*sin(f*x + e)/(cos(f*x + e) + 1)
+ 10*a^3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 10*a^3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 5*a^3*sin(f*x + e)
^4/(cos(f*x + e) + 1)^4 + a^3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) - 2*B*c*(5*sin(f*x + e)/(cos(f*x + e) + 1)
+ 10*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 1)/(a^3 + 5*a^3*sin(f*x + e)/(cos(f*x + e) + 1) + 10*a^3*sin(f*x +
e)^2/(cos(f*x + e) + 1)^2 + 10*a^3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 5*a^3*sin(f*x + e)^4/(cos(f*x + e) +
1)^4 + a^3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) - 3*A*c*(5*sin(f*x + e)/(cos(f*x + e) + 1) + 5*sin(f*x + e)^2/
(cos(f*x + e) + 1)^2 + 5*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 1)/(a^3 + 5*a^3*sin(f*x + e)/(cos(f*x + e) + 1)
 + 10*a^3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 10*a^3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 5*a^3*sin(f*x + e
)^4/(cos(f*x + e) + 1)^4 + a^3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 3*B*c*(5*sin(f*x + e)/(cos(f*x + e) + 1)
 + 5*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 5*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 1)/(a^3 + 5*a^3*sin(f*x + e
)/(cos(f*x + e) + 1) + 10*a^3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 10*a^3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3
 + 5*a^3*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + a^3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5))/f

________________________________________________________________________________________

mupad [B]  time = 13.03, size = 172, normalized size = 1.67 \[ \frac {2\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (\frac {41\,A\,c}{4}-\frac {B\,c}{4}-\frac {11\,A\,c\,\cos \left (e+f\,x\right )}{2}+\frac {B\,c\,\cos \left (e+f\,x\right )}{2}+5\,A\,c\,\sin \left (e+f\,x\right )+5\,B\,c\,\sin \left (e+f\,x\right )-\frac {3\,A\,c\,\cos \left (2\,e+2\,f\,x\right )}{4}+\frac {3\,B\,c\,\cos \left (2\,e+2\,f\,x\right )}{4}-\frac {5\,A\,c\,\sin \left (2\,e+2\,f\,x\right )}{4}-\frac {5\,B\,c\,\sin \left (2\,e+2\,f\,x\right )}{4}\right )}{15\,a^3\,f\,\left (\frac {5\,\sqrt {2}\,\cos \left (\frac {3\,e}{2}+\frac {\pi }{4}+\frac {3\,f\,x}{2}\right )}{4}-\frac {5\,\sqrt {2}\,\cos \left (\frac {e}{2}-\frac {\pi }{4}+\frac {f\,x}{2}\right )}{2}+\frac {\sqrt {2}\,\cos \left (\frac {5\,e}{2}-\frac {\pi }{4}+\frac {5\,f\,x}{2}\right )}{4}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*sin(e + f*x))*(c - c*sin(e + f*x)))/(a + a*sin(e + f*x))^3,x)

[Out]

(2*cos(e/2 + (f*x)/2)*((41*A*c)/4 - (B*c)/4 - (11*A*c*cos(e + f*x))/2 + (B*c*cos(e + f*x))/2 + 5*A*c*sin(e + f
*x) + 5*B*c*sin(e + f*x) - (3*A*c*cos(2*e + 2*f*x))/4 + (3*B*c*cos(2*e + 2*f*x))/4 - (5*A*c*sin(2*e + 2*f*x))/
4 - (5*B*c*sin(2*e + 2*f*x))/4))/(15*a^3*f*((5*2^(1/2)*cos((3*e)/2 + pi/4 + (3*f*x)/2))/4 - (5*2^(1/2)*cos(e/2
 - pi/4 + (f*x)/2))/2 + (2^(1/2)*cos((5*e)/2 - pi/4 + (5*f*x)/2))/4))

________________________________________________________________________________________

sympy [A]  time = 13.79, size = 1035, normalized size = 10.05 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))/(a+a*sin(f*x+e))**3,x)

[Out]

Piecewise((-30*A*c*tan(e/2 + f*x/2)**4/(15*a**3*f*tan(e/2 + f*x/2)**5 + 75*a**3*f*tan(e/2 + f*x/2)**4 + 150*a*
*3*f*tan(e/2 + f*x/2)**3 + 150*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 30*A*c*t
an(e/2 + f*x/2)**3/(15*a**3*f*tan(e/2 + f*x/2)**5 + 75*a**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*f*tan(e/2 + f*x/2
)**3 + 150*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 50*A*c*tan(e/2 + f*x/2)**2/(
15*a**3*f*tan(e/2 + f*x/2)**5 + 75*a**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*f*tan(e/2 + f*x/2)**3 + 150*a**3*f*ta
n(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 10*A*c*tan(e/2 + f*x/2)/(15*a**3*f*tan(e/2 + f*x
/2)**5 + 75*a**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*f*tan(e/2 + f*x/2)**3 + 150*a**3*f*tan(e/2 + f*x/2)**2 + 75*
a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 8*A*c/(15*a**3*f*tan(e/2 + f*x/2)**5 + 75*a**3*f*tan(e/2 + f*x/2)**4 +
150*a**3*f*tan(e/2 + f*x/2)**3 + 150*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 30
*B*c*tan(e/2 + f*x/2)**3/(15*a**3*f*tan(e/2 + f*x/2)**5 + 75*a**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*f*tan(e/2 +
 f*x/2)**3 + 150*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 10*B*c*tan(e/2 + f*x/2
)**2/(15*a**3*f*tan(e/2 + f*x/2)**5 + 75*a**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*f*tan(e/2 + f*x/2)**3 + 150*a**
3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 10*B*c*tan(e/2 + f*x/2)/(15*a**3*f*tan(e/2
 + f*x/2)**5 + 75*a**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*f*tan(e/2 + f*x/2)**3 + 150*a**3*f*tan(e/2 + f*x/2)**2
 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 2*B*c/(15*a**3*f*tan(e/2 + f*x/2)**5 + 75*a**3*f*tan(e/2 + f*x/2)
**4 + 150*a**3*f*tan(e/2 + f*x/2)**3 + 150*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f
), Ne(f, 0)), (x*(A + B*sin(e))*(-c*sin(e) + c)/(a*sin(e) + a)**3, True))

________________________________________________________________________________________